﻿using System;

namespace WorkOrder.Model
{
    public class Model_Table_Customer_Info
    {
        private DateTime _acceptance_time;
        private bool _acceptanced;
        private string _account_manager, _account_manager_tell, _area_id, _customer_address, _customer_info_id,
            _customer_name, _customer_tell, _equipment_model, _inte_unit_id, _period, _product_id, _station_name, _town_id;
        private string _area_name, _inte_unit_name, _product_name, _town_name, _operator;

        /// <summary>
        /// 验收时间
        /// </summary>
        public DateTime Acceptance_time { set { _acceptance_time = value; } get { return _acceptance_time; } }
        /// <summary>
        /// 是否验收
        /// </summary>
        public bool Acceptanced { set { _acceptanced = value; } get { return _acceptanced; } }
        /// <summary>
        /// 客户经理
        /// </summary>
        public string Account_manager { set { _account_manager = value; } get { return _account_manager; } }
        /// <summary>
        /// 客户经理联系电话
        /// </summary>
        public string Account_manager_tell { set { _account_manager_tell = value; } get { return _account_manager_tell; } }
        /// <summary>
        /// 区域
        /// </summary>
        public string Area_id { set { _area_id = value; } get { return _area_id; } }
        /// <summary>
        /// 客户地址
        /// </summary>
        public string Customer_address { set { _customer_address = value; } get { return _customer_address; } }
        /// <summary>
        /// ID
        /// </summary>
        public string Customer_info_id { set { _customer_info_id = value; } get { return _customer_info_id; } }
        /// <summary>
        /// 客户联系人
        /// </summary>
        public string Customer_name { set { _customer_name = value; } get { return _customer_name; } }
        /// <summary>
        /// 客户联系电话
        /// </summary>
        public string Customer_tell { set { _customer_tell = value; } get { return _customer_tell; } }
        /// <summary>
        /// 设备型号
        /// </summary>
        public string Equipment_model { set { _equipment_model = value; } get { return _equipment_model; } }
        /// <summary>
        /// 集成单位
        /// </summary>
        public string Inte_unit_id { set { _inte_unit_id = value; } get { return _inte_unit_id; } }
        /// <summary>
        /// 工期
        /// </summary>
        public string Period { set { _period = value; } get { return _period; } }
        /// <summary>
        /// 产品类型
        /// </summary>
        public string Product_id { set { _product_id = value; } get { return _product_id; } }
        /// <summary>
        /// 站点名称
        /// </summary>
        public string Station_name { set { _station_name = value; } get { return _station_name; } }
        /// <summary>
        /// 镇区
        /// </summary>
        public string Town_id { set { _town_id = value; } get { return _town_id; } }

        /// <summary>
        /// 录入人
        /// </summary>
        public string Operator { set { _operator = value; } get { return _operator; } }

        /// <summary>
        /// 
        /// </summary>
        public string Area_name { set { _area_name = value; } get { return _area_name; } }
        public string Inte_unit_name { set { _inte_unit_name = value; } get { return _inte_unit_name; } }
        public string Product_name { set { _product_name = value; } get { return _product_name; } }
        public string Town_name { set { _town_name = value; } get { return _town_name; } }

        public Model_Table_Customer_Info() { }
        /// <summary>
        /// 构造方法
        /// </summary>
        /// <param name="customer_info_id">ID</param>
        /// <param name="station_name">站点名称</param>
        /// <param name="product_id">产品类型</param>
        /// <param name="area_id">区域</param>
        /// <param name="town_id">镇区</param>
        /// <param name="customer_address">客户地址</param>
        /// <param name="customer_name">客户联系人</param>
        /// <param name="customer_tell">客户联系电话</param>
        /// <param name="account_manager">客户经理</param>
        /// <param name="account_manager_tell">客户经理电话</param>
        /// <param name="equipment_model">设备型号</param>
        /// <param name="inte_unit_id">集成单位</param>
        /// <param name="period">工期</param>
        /// <param name="acceptanced">是否验收通过,0否,1是</param>
        /// <param name="acceptance_time">验收日期</param>
        public Model_Table_Customer_Info(string customer_info_id, string station_name, string product_id, string area_id, string town_id, string customer_address, string customer_name,
            string customer_tell, string account_manager, string account_manager_tell, string equipment_model, string inte_unit_id, string period, string acceptanced, 
            string acceptance_time, string __operator)
        {
            if (acceptanced == "0") _acceptanced = false; else _acceptanced = true;
            if (!string.IsNullOrEmpty(acceptance_time))
                try
                {
                    _acceptance_time = Convert.ToDateTime(acceptance_time);
                }
                 catch {}
            _area_id = area_id;
            _customer_address = customer_address;
            _customer_info_id = customer_info_id;
            _customer_name = customer_name;
            _customer_tell = customer_tell;
            _equipment_model = equipment_model;
            _inte_unit_id = inte_unit_id;
            _period = period;
            _product_id = product_id;
            _station_name = station_name;
            _town_id = town_id;
            _account_manager = account_manager;
            _account_manager_tell = account_manager_tell;
            _operator = __operator;
        }
    }
}
